import Layout from '@/views/layout.vue'
import Like from '@/views/secondes/like'
import Article from '@/views/secondes/article'
import Collect from '@/views/secondes/collect'
import User from '@/views/secondes/user'

import Detail from '@/views/detail.vue'
import Login from '@/views/login.vue'
import Register from '@/views/register.vue'

const routes = [
  {
    path: '/',
    component: Layout,
    redirect: '/article',
    children: [
      { path: 'article', component: Article },
      { path: 'like', component: Like },
      { path: 'collect', component: Collect },
      { path: 'user', component: User }
    ]
  },
  { path: '/detail/:id', component: Detail },
  { path: '/login', component: Login },
  { path: '/register', component: Register }
]

export default routes
